<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE HTML>
<html>
  <head>
    
    <title>天安财险</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<style type="text/css">
		html,body,table{background-color:#f5f5f5;width:100%;text-align:center;}
	  .form-signin-heading{font-family:Helvetica, Georgia, Arial, sans-serif, 黑体;font-size:36px;margin-bottom:20px;color:#0663a2;}
      .form-signin{position:relative;text-align:left;width:300px;padding:25px 29px 29px;margin:0 auto 20px;background-color:#fff;border:1px solid #e5e5e5;
        	-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05);}
      .form-signin .input-label{font-size:16px;line-height:23px;color:#999;}
      .form-signin .input-block-level{font-size:16px;height:auto;margin-bottom:15px;padding:7px;*width:283px;*padding-bottom:0;_padding:7px 7px 9px 7px;}
      .form-signin .btn.btn-large{font-size:16px;}
      .header{height:80px;padding-top:20px;} .alert{position:relative;width:300px;margin:0 auto;*padding-bottom:0px;}
      label.error{background:none;width:270px;font-weight:normal;color:inherit;margin:0;}
	</style>
	<script src="${ctxStatic}/common/md5.js" type="text/javascript"></script>
	<script type="text/javascript">
		//登录校验并加密		
		$(function(){
			$("#loginForm").validate({
				messages: {
					username: {required: "请填写用户名."},password: {required: "请填写密码."}
				},
				errorLabelContainer: "#messageBox",
				errorPlacement: function(error, element) {
					error.appendTo($("#loginError").parent());
				} ,
				submitHandler : function(form){
					var password = $("#password").val();
					$("#password").val(hex_md5(password));
					form.submit();
				}
			});
		});
	</script>
  </head>
  
  <body>
  <div class="header">
  		<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}">
			<button data-dismiss="alert" class="close">×</button>
			<label id="loginError" class="error">${message}</label>
		</div>
	</div>
    <form id="loginForm" class="form-signin" action="${ctx}/login" method="post">
    	<sys:msg msgObj="${msg}" />
		<label class="input-label" for="loginName">登录名</label>
		<input type="text" id="username" name="username" class="input-block-level" value="${username}">
		<label class="input-label" for="password">密码</label>
		<input type="password" id="password" name="password" class="input-block-level">
		<input class="btn btn-large btn-primary" type="submit" value="登 录">&nbsp;&nbsp;
		<label for="rememberMe" title="下次不需要再登录">
			<input type="checkbox" id="rememberMe"
				   name="rememberMe" ${rememberMe ? 'checked' : ''}> 记住我</label>

	</form>
  </body>
</html>
